//
//  ViewController.m
//  lesson7
//
//  Created by TMac on 17/11/13.
//  Copyright © 2017年 TMac. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
{
    NSMutableArray<NSString *> *data;
}
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    data = @[@"肖志兴|18273271632", @"马君毅|13907326327", @"邓汉清|18473439141", @"彭国权|15197429824", @"刘晓翠|13647470231", @"王凯|18374708434", @"唐碧琛|18216023014", @"况真妮|15173391523", @"戴柳涛|18374077195", @"曾骞|15080935144", @"杜金锟|13574279720", @"肖虎|15115550940", @"徐怀宇|18773541123", @"胡政政|18273576727", @"刘建康|13167417037", @"何艳鹏|15973527664", @"胡峰|15675725575", @"李峰|18216000548", @"刘珍珍|18274937341", @"钟伟|15207461771", @"刘彪|18707388199", @"余宏姣|13203341157", @"杨灿正|13507333250", @"易哲为|17607332968", @"胡运鸿|18173398842", @"谭建喜|13617332522", @"尹志强|18373317366", @"廖瑞奇|18273309215", @"彭秋香|15074128289", @"肖冉|18897491202", @"苏文|13487630939", @"曾维承|18774125710"].mutableCopy;
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return data.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:nil];
    NSString *tel = data[indexPath.row];
    NSArray *t = [tel componentsSeparatedByString:@"|"];
    cell.textLabel.text = t[0];
    cell.detailTextLabel.text = t[1];
    return cell;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
